package org.example.classtopia.Mapper;


import org.apache.ibatis.annotations.Param;
import org.example.classtopia.Model.Entity.UserFollow;
import org.example.classtopia.Model.vo.FolloweeVO;
import org.example.classtopia.Model.vo.PostPreviewVO;  // 修改为已有的PostPreviewVO

import java.util.List;

public interface UserFollowMapper {

    int insert(UserFollow userFollow);

    int updateStatus(@Param("followerId") Long followerId,
                     @Param("followeeId") Long followeeId,
                     @Param("status") Integer status);

    List<FolloweeVO> selectFolloweesByFollowerId(@Param("followerId") Long followerId,
                                                 @Param("status") Integer status);

    List<PostPreviewVO> selectPostsByUserId(@Param("userId") Long userId);

    int countByFollowerIdAndFolloweeIdAndStatus(@Param("followerId") Long followerId,
                                                @Param("followeeId") Long followeeId,
                                                @Param("status") Integer status);// 修改返回类型
}


